Skip to content

feat(py): middleware plugin + samples#5263

Closed
huangjeff5 wants to merge 19 commits into
jh-mwfrom
jh-mw-plugin
Closed

feat(py): middleware plugin + samples#5263
huangjeff5 wants to merge 19 commits into
jh-mwfrom
jh-mw-plugin

Conversation

@huangjeff5
Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added docs Improvements or additions to documentation python Python config labels May 8, 2026
Comment thread py/plugins/middleware/src/genkit/plugins/middleware/_tool_approval.py Outdated
Comment thread py/plugins/middleware/src/genkit/plugins/middleware/_retry.py Outdated
Comment thread py/plugins/middleware/src/genkit/plugins/middleware/__init__.py Outdated
Comment thread py/plugins/middleware/src/genkit/plugins/middleware/_fallback.py Outdated
Comment thread py/plugins/middleware/tests/__init__.py Outdated
Comment thread py/pyproject.toml Outdated
Comment thread py/samples/middleware/pyproject.toml
Comment thread py/plugins/middleware/pyproject.toml Outdated
Comment thread py/plugins/middleware/README.md Outdated
Comment thread py/plugins/middleware/README.md Outdated
@huangjeff5 huangjeff5 force-pushed the jh-mw-plugin branch 10 times, most recently from 636c2ef to 689cc2f Compare May 19, 2026 08:30
@huangjeff5 huangjeff5 force-pushed the jh-mw-plugin branch 2 times, most recently from 50af16a to 9d8f848 Compare May 26, 2026 01:10
)

response = await ai.generate(
model='googleai/gemini-2.5-flash',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gemini-flash-latest

)

response = await ai.generate(
model='googleai/gemini-2.5-flash',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gemini-flash-latest


ai = Genkit(
plugins=[GoogleAI(), Middleware()],
model='googleai/gemini-2.5-flash',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gemini-flash-latest

from genkit.plugins.middleware import Retry, Fallback

response = await ai.generate(
prompt='Hello',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add model="gemini-flash-latest"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config docs Improvements or additions to documentation python Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants